function formValidate(value,type){
	let reg = '',
		regObj = {
			phone:/^1[34578]\d{9}$/,
			email:/^[a-zA-Z0-9_.-]+@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.[a-zA-Z0-9]{2,6}$/
		}
    if (!regObj[type]) {
        return
    }
	return regObj[type].test(value);
}

module.exports = formValidate;